package common_package

import (
	"io"
	"log"
	"net/http"
)

func WebServer() {
	http.HandleFunc("/", hello)
	err := http.ListenAndServe(":9999", nil)
	if err != nil {
		log.Println("发生错误", err)
	}
}

func hello(w http.ResponseWriter, r *http.Request) {
	io.WriteString(w, "Hello world")
}
